home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / LL_LAND.ZIP / LL_INIT.INC < prev    next >
Text File  |  1993-05-11  |  3KB  |  85 lines

  1. ;;
  2. ;; [ Lord Logics Unchained Mode INIT ]
  3. ;;
  4. ll_xinit proc
  5.     push    es
  6.     push    di
  7.     push    ds
  8.  
  9.     mov     ax,@data
  10.     mov     ds,ax
  11.  
  12.     cli                             ;; Don't INTerrupt us!
  13.  
  14.     ll_port 03C4h,04h               ;; Sequencer: Memory Mode
  15.     and     al,11110101b            ;; Disable ODD/EVEN Mode
  16.     or      al,00000100b            ;; Select Chain 4
  17.     out     dx,al                   ;; Disable Extended Memory
  18.  
  19.     ll_port 03CEh,05h               ;; Graphics: Mode Register
  20.     and     al,11101111b            ;; Disable ODD/EVEN Mode
  21.     out     dx,al                   ;; :
  22.  
  23.     ll_port 03CEh,06h               ;; Graphics: Misc Register
  24.     and     al,11110101b            ;; Disable CHAIN ODD/EVEN
  25.     or      al,00000100b            ;; Memory Mode to A0000-AFFFF
  26.     out     dx,al                   ;; :
  27.  
  28.     ll_port 03D4h,14h               ;; LLT Controller: Underline Loc
  29.     and     al,10111111b            ;; Disable DOUBLE WORD
  30.     out     dx,al
  31.  
  32.     ll_port 03D4h,17h               ;; CRT Controller: Mode Control
  33.     or      al,01000000b            ;; Set BYTE MODE
  34.     and     al,11011111b            ;; Set Address Wrap
  35.     out     dx,al
  36.  
  37.     ll_flip                         ;; Clear the FLIP-FLOP
  38.     ll_attr 10h                     ;; Attr Controller: Mode Control
  39.     mov     al,01100001b            ;; Set lotsa stuff . . .
  40.     out     dx,al                   ;; :
  41.  
  42.     ll_port 03C4h,02h               ;; Sequencer: Map Mask
  43.     mov     al,00001111b            ;; Enable Planes 0,1,2,3
  44.     out     dx,al                   ;; :
  45.  
  46.     sti
  47.     mov     di,0A000h               ;; Clear the VIDEO MEMORY
  48.     mov     es,di                   ;; :
  49.     xor     di,di                   ;; :
  50.     xor     ax,ax                   ;; :
  51.     mov     cx,32000                ;; :
  52. @@:     mov     es:[di],ax              ;; :
  53.     add     di,2                    ;; :
  54.     dec     cx                      ;; :
  55.     jnz     @B                      ;; :
  56.     cli
  57.  
  58.     ll_attr 33h                     ;; Attr Controller: Horiz Pix Pan
  59.     xor     al,al                   ;; Clear the HORIZ PIX PAN
  60.     out     dx,al                   ;; :
  61.  
  62.     ll_port 03D4h,13h               ;; CRT Controller: Offset Register
  63.     mov     al,(LL_HOR/8)           ;; Set OFFSET to # of chrs (REAL/4)
  64.     out     dx,al                   ;; :
  65.  
  66.     ll_port 03D4h,0Ch               ;; CRT Controller: Start Addr High
  67.     mov     ax,LL_SHOW              ;; Set HIGH ADDRESS to SHOW_PAGE
  68.     mov     al,ah                   ;; :
  69.     out     dx,al                   ;; :
  70.  
  71.     ll_port 03D4h,0Dh               ;; CRT Controller: Start Addr Low
  72.     mov     ax,LL_SHOW              ;; Set LOW ADDRESS to SHOW_PAGE
  73.     out     dx,al                   ;; :
  74.  
  75.     sti                             ;; INTerruptions are OK now!
  76.  
  77.     xor     ax,ax                   ;; Clear return flag
  78.  
  79. cr_id:  pop     ds
  80.     pop     di
  81.     pop     es
  82.     ret
  83. ll_xinit endp
  84.  
  85.